#!/bin/bash
val_pwd=`pwd`
val_num=`ls -a | wc -l`
val_filename=filename.txt
echo `ls -a` > "$val_filename"
cat "$val_filename"
echo "$val_num"